/*******************************************************************************
 * Level Master 2000
 * Copyright (C) 2010 Christian Herzog
 * For more information see http://code.google.com/p/levelmaster2000/
 *
 * This file is licensed under the terms of the MIT license, see
 * http://www.opensource.org/licenses/mit-license.php for further information.
 ******************************************************************************/

//#ifndef SELECT_COMPONENTS_COMMAND_H
//#define SELECT_COMPONENTS_COMMAND_H
//
//#include <QUndoCommand>
//#include <QStringList>
//
//#include "levelmaster2000.h"
//
////Command for selecting components.
////Difference to selecting entities: mainly, it's that only the 
////selected components are displayed in the propery browser!
//
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
////THIS IS NOT USED ANYMORE!!!!!!!!!!!
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//class SelectComponentsCommand : public QUndoCommand
//{
//public:
//	SelectComponentsCommand( LevelMaster2000* lm2k,
//		QString newEntityName,
//		QStringList newValue,
//		QString oldEntityName,
//		QStringList oldValue,
//		QUndoCommand *parent = 0 )
//		: QUndoCommand( parent ),
//		lm2k( lm2k ),
//		newEntityName( newEntityName ),
//		newValue( newValue ),
//		oldEntityName( oldEntityName ),
//		oldValue( oldValue )
//	{
//	}
//
//	void undo()
//	{
//		LevelMaster2000::DISALLOW_NEW_COMMAND++;
//		{
//			if( oldValue[0] == "" )
//			{
//				QStringList entities;
//				entities << oldEntityName;
//				lm2k->sendSelectEntities( entities );
//			}
//			else
//			{
//				lm2k->sendSelectComponents( oldEntityName, oldValue );
//			}
//			setText( "Select Components" );
//		}
//		LevelMaster2000::DISALLOW_NEW_COMMAND--;
//	}
//
//	void redo()
//	{
//		LevelMaster2000::DISALLOW_NEW_COMMAND++;
//		{
//			if( newEntityName == "" )
//			{
//				QStringList entities;
//				entities << newEntityName;
//				lm2k->sendSelectEntities( entities );
//			}
//			else
//			{
//				lm2k->sendSelectComponents( newEntityName, newValue );
//			}
//			setText( "Select Components" );
//		}
//		LevelMaster2000::DISALLOW_NEW_COMMAND--;
//	}
//
//private:
//	LevelMaster2000 *lm2k;
//
//	QString newEntityName;
//	QStringList newValue;
//
//	QString oldEntityName;
//	QStringList oldValue;
//};
//
//#endif
